﻿using DevComponents.DotNetBar;
using Kimd.Common;
using Kimd.Machine;
using Kimd.Motion;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using WorkStation.Common;

namespace WorkStation.UI
{
    public partial class FormDelayStep : Office2007Form
    {
        public List<string> PointNames;
        public Step CurrentStep { get; set; }
        public FormDelayStep(Step step, List<string> pointNames)
        {
            InitializeComponent();
            this.EnableGlass = false;
            this.CurrentStep = step;
            this.PointNames = pointNames;
        }

        private void FormDigitalOutputStep_Load(object sender, EventArgs e)
        {
            nUD_DelayTime.Value = (CurrentStep as DelayStep).DelayTime;
        }

        private void btn_Confirm_Click(object sender, EventArgs e)
        {
            (CurrentStep as DelayStep).DelayTime = (int)nUD_DelayTime.Value;
            this.DialogResult = DialogResult.OK;
            this.Close();
        }

        private void btn_Cancel_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
            this.Close();
        }
    }
}
